package com.miyuan.wm.pojo;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName AccessRecordEntity
 * @Description 用户登入登出记录
 */
@TableName("my_access_record")
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class AccessRecordEntity implements Serializable {

    @TableId(type = IdType.AUTO, value = "id")
    private int id; // 数据库Id

    @TableField(value = "user_id")
    private int userId; // 用户Id

    @TableField(value = "user_name")
    private String userName; // 用户名称

    @TableField(value = "access_type")
    private String accessType; // 记录类型，登入或登出

    @TableField(value = "access_time")
    private Date accessTime; // 记录时间

    @TableField(value = "access_ip")
    private String accessIp; // 用户登入或登出对应的IP地址
}
